Hygienic Literate Programming: Lessons from ChezWEB
نویسنده
چکیده
Literate programming systems are a class of domain specific languages designed to encourage writing programs specifically to be read as essays or books by humans instead of by machines. Systems like CWEB, WEB, and ChezWEB allow the user to associate arbitrary code bodies with a concise but natural language description. That description may then be referred to in other sections of the program source, and the code body associated with the description is substituted for the reference in the program source. Using Scheme macros, we describe how this substitution is performed unhygienically. We then describe and implement an innovation unique to ChezWEB that extends the notion of code reordering to provide hygiene and referential transparency guarantees for section references and code substitutions in the system. Our implementation strategy serves as a design pattern for implementing other language forms for which the programmer desires similar hygienic guarantees.
منابع مشابه
Literate Programming in Forth
We look at Donald Knuth's concept of \Literate Programming," investigating exactly what it is and how it is used to assist conventional programmers. We then ask what lessons we can learn from this idea and if it is possible to apply them to Forth. We look at the alterations needed to the system and/or Forth to allow us to take advantage of this system. Indeed do we obtain all of the advantages ...
متن کاملIncreasing Assurance with Literate Programming Techniques
The assurance argument that a trusted system satis es its information security requirements must be convincing, because the argument supports the accreditation decision to allow the computer to process classi ed information in an operational environment. Assurance is achieved through understanding, but some evidence that supports the assurance argument can be di cult to understand. This paper d...
متن کاملAOPS: an abstraction-oriented programming system for literate programming
The practice of literate programming is not widespread because existing literate programming systems have some undesirable characteristics such as programming language and text processor dependence and lack of flexible tools for viewing and manipulation of the source file. This paper describes the literate programming system AOPS (Abstraction Oriented Programming System) which addresses both of...
متن کاملThirty Years of Literate Programming and More?
Don Knuth created Literate Programming about thirty years ago. It could be called a methodology, discipline, paradigm, . . . Bentley’s “Programming Pearls” article about Knuth’s book, TEX: The Program, caused a huge stir in the computing professions. Soon there was announcement of a Literate Programming section for the CACM . Several “Literate Programming systems” quickly appeared. This was fol...
متن کاملA Literate Programming Tool for Concurrent Clean
Literate programming has attracted some interest in the functional programming community. This paper presents a prettyprinting algorithm used in a literate programming tool for the functional language Concurrent Clean, and discusses some of the issues involved in prettyprinting layout based languages. 1 Literate programming This section introduces the concept of literate programming for those w...
متن کامل